classDiagram
    class Mediator {
        +register(colleague: Colleague): void
        +sendMessage(message: string, colleague: Colleague): void
    }
    
    class ConcreteMediator {
        +colleagues: List~Colleague~
        +register(colleague: Colleague): void
        +sendMessage(message: string, colleague: Colleague): void
    }
    
    class Colleague {
        +mediator: Mediator
        +send(message: string): void
        +receive(message: string): void
    }
    
    class ConcreteColleagueA {
        +send(message: string): void
        +receive(message: string): void
    }
    
    class ConcreteColleagueB {
        +send(message: string): void
        +receive(message: string): void
    }

    Mediator <|-- ConcreteMediator
    Colleague <|-- ConcreteColleagueA
    Colleague <|-- ConcreteColleagueB

    ConcreteColleagueA --> ConcreteMediator : communicates with
    ConcreteColleagueB --> ConcreteMediator : communicates with
